home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The AGA Experience 2
/
agavol2.iso
/
software
/
utilities
/
emulation
/
zxam spectrum
/
zxam_rexx
/
english
/
zxamrun.dopus
< prev
next >
Wrap
Text File
|
1995-07-31
|
1KB
|
41 lines
/* This script loads a snapshot from disk */
/* Used originaly fo load games from DirOpus, through a FileType */
/* Needs the emulator to be previously loaded in memory, unless you modify */
/* the script to run the emulator when the emulator port is not found */
parse arg nombre /* gets the only argument */
/* Uses the internal loaders of the emulator */
address command
if ~show(ports,ZXAM_REXX) then do
requestchoice 'title "ZXAM Script error..." body "I couldn't find the emulators port!!" gadgets "AARGH!"'
exit
end
/* Store the initial state of the emulator */
running=zxamactrun() /* 1=running */
zxamstop() /* stop the emulator */
/* load the snapshot */
bloque=zxampploadfile(nombre) /* load the whole file */
formato=zxamparseloaded(bloque) /* checks the format and loads the file */
if formato~='' then do
zxamnameformat(zxamfilepart(nombre),formato)
zxamloadpath(zxampathpart(nombre))
zxamenablereload()
end
if running=1 then zxamrun()
exit